﻿<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" import="java.util.*" %>
<%String path = request.getContextPath(); %> 
<!DOCTYPE html>
<html>
<head>
<title>我的课程</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="zh-CN" />
<link href="<%=path%>/resources/css/pages/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<%=path%>/resources/script/js/jquery-1.8.0.min.js" ></script>
<script src="<%=path%>/resources/script/js/vue.js"></script>
<script type="text/javascript" src="<%=path%>/resources/script/js/js.js" ></script>
</head>
<body>
<div id="contentBody">
<div class="top">
  <div class="top-ct">
    <h3 class="logo"></h3> 
    <span id='span'>
       <a href="<%=path%>/pages/login" id='plogin'><span >您好，请登录！</span></a>
       <a href="<%=path%>/pages/userInfo?userid=${loginUser.id}" id='pshow'><span>${loginUser.nickName}（${loginUser.account }）</span></a>
    </span>
    <p><a href="<%=path%>/index">首页</a>
    <a href="javascript:void(0);"  class="select">我的课程</a>
    <a href="<%=path%>/pages/learnhistory?userid=${loginUser.id}">学习历史</a>
    <a href="javascript:void(0);">我的技能</a></p> 
    </div>
</div>

<div id="main">
<div class="ny-ban"><img src="<%=path%>/resources/images/pages/images/ny-ban.jpg"></div>
<div class="position">
 <p><a href="<%=path%>/index" class="syx">首页</a> ><a href="javascript:void(0);">我的课程</a></p>
 <form>
  <label><input type="text"  placeholder="搜索课程名称"  class="ssbt"></label>
  <label><input type="submit" class="ssan" value="" ></label>
 
 </form>
</div>

<div class="course_list" v-if="courseList.length>0">
  <dl v-for="item in courseList" :class="$index%2==0? 'biye dl-left':'biye dl-right'">
    <dt><a href="<%=path%>/pages/subjectdetail?id={{item.id}}&userid=${loginUser.id}">
    <img :src="item.image" onerror="javascript:this.src='<%=path%>/resources/images/pages/images/default.png'">
    </a></dt>
    <dd>
       <h3><a href="<%=path%>/pages/subjectdetail?id={{item.id}}&userid=${loginUser.id}">【{{item.name}}】</a></h3>
       <span><a href="javascript:void(0);">&nbsp;&nbsp;任课老师：{{item.teacher}}</a></span>
       <p><a href="<%=path%>/pages/subjectdetail?id={{item.id}}&userid=${loginUser.id}">{{{item.remark}}}</a></p>
       <div class="probar">
       	<div class="proleft" :style='"width: "+item.percent+"%";'></div>
       	<div class="spandot"></div>
       	<div class="proright" :style='"width: "+(100-item.percent)+"%";'></div>
        </div>
     	<div class="provalue">{{item.percent}}%</div>
       <strong v-if="item.percent==100"><img src="<%=path%>/resources/images/pages/images/biye.jpg"></strong>      
    </dd>
  </dl>
</div>
<div class="course_list" style="font-size:18px;color:#777;text-align:center;border" v-else>暂无您的个人课程</div>
<div class="clear"></div>
</div>
<div class="foot">
<div class="foot-top"></div>
<div class="foot-ct"><p>Copyright © 2016 业主单位：福建工程学院，建设单位：福州森泽信息科技有限公司 技术服务热线：87862229
   <a href="#"><img src="<%=path%>/resources/images/pages/images/cnzz.jpg"></a></p></div>

</div>
</div>
<script src="<%=path%>/resources/script/requestjs/courselist.js"></script>
<script type="text/javascript"  language="JavaScript">
$(function(){
	var myName='${loginUser.account}';
	if(myName==""||myName==undefined)
	{
		document.getElementById('plogin').setAttribute("style", "display:inline");
		document.getElementById('pshow').setAttribute("style", "display:none");
	}
	else{
		document.getElementById('plogin').setAttribute("style", "display:none");
		document.getElementById('pshow').setAttribute("style", "display:inline");
	}
});
</script>
</body>
</html>
